<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        li {
            float: left;
        }

        input {
            display: none;
        }

        label {
            display: inline-block;
            width: 100px;
            height: 30px;
            text-align: center;
            line-height: 30px;
            /* border: 1px solid #000; */
            margin-top: 30px;
        }

        /* :checked 只有单选和多选有 */

        input:checked+label {
            /* border-color: red; */
            color: red;
        }
    </style>
</head>

<body>
    <ul>
        <li>
            <input type="radio" name="s" id="a">
            <label for="a">A.红色</label>
        </li>
        <li>
            <input type="radio" name="s" id="b">
            <label for="b">B.白色</label>
        </li>
        <li>
            <input type="radio" name="s" id="c">
            <label for="c">C.蓝色</label>
        </li>
    </ul>

    <!-- <ul>
        <li>
            <input type="checkbox" name="s" id="a1">
            <label for="a1">红色</label>
        </li>
        <li>
            <input type="checkbox" name="s" id="b1">
            <label for="b1">白色</label>
        </li>
        <li>
            <input type="checkbox" name="s" id="c1">
            <label for="c1">蓝色</label>
        </li>
    </ul> -->
</body>

</html>